import request from '@/utils/request'

// 自定义表单创建流程
export function createProcessInstance(data) {
  return request({
    url: '/bpm/process-instance/create',
    method: 'post',
	data
  })
}
// export const createProcessInstance = async (data) => {
//   return await request.post({ url: '/bpm/process-instance/create', data: data })
// }


// 获取发起流程列表
export function getProcessDefinitionList(data) {
  return request({
    url: '/bpm/process-definition/list',
    method: 'get',
	data
  })
}


// 我的流程
export function getProcessInstanceMyPage(data) {
  return request({
    url: '/bpm/process-instance/my-page',
    method: 'get',
	data
  })
}

// 待办任务
export function getTaskTodoPage(data) {
  return request({
    url: '/bpm/task/todo-page',
    method: 'get',
	data
  })
}

// 已办任务
export function getTaskDonePage(data) {
  return request({
    url: '/bpm/task/done-page',
    method: 'get',
	data
  })
}

// 抄送我的 
export function getProcessInstanceCopyPage(data) {
  return request({
    url: '/bpm/process-instance/copy/page',
    method: 'get',
	data
  })
}

// export const getProcessInstanceCopyPage = async (params: any) => {
//   return await request.get({ url: '/bpm/process-instance/copy/page', params })
// }
// export const getTaskDonePage = async (params: any) => {
//   return await request.get({ url: '/bpm/task/done-page', params })
// }
// export const getTaskTodoPage = async (params: any) => {
//   return await request.get({ url: '/bpm/task/todo-page', params })
// }
// export const getProcessInstanceMyPage = async (params: any) => {
//   return await request.get({ url: '/bpm/process-instance/my-page', params })
// }